<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>

<body>
<div id="app">
    <div>
        A:<input type="text" v-model="a">+
        B:<input type="text" v-model="b">
        结果：<span v-text="c"></span>
    </div>
    <input type="button" @click="add" value="等于">
</div>
</body>
<script  src="js/vue.min.js"></script>
<script type="text/javascript">
    var vm = new Vue({
        el: '#app',
        data: {
            a: '',
            b: '',
            c: ''
        },
        methods: {
            add: function () {
                this.c = parseInt(this.a) +parseInt(this.b)
            }
        }
    })
</script>
</html>